package com.chenxi.vhr.utils;

import com.chenxi.vhr.bean.BaseUser;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @author : zhangchenxi
 * @create : 2022-02-08
 **/
public class SystemUtil {

    public static BaseUser  getCurrentUser() {
        BaseUser principal = (BaseUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        return principal;
    }
}
